Comments for MEDB 5502, Week 03

Topics to be covered

  • What you will learn
    • Indicator variables for three or more categories
    • Multiple factor analysis of variance
    • Checking assumptions of analysis of variance
    • Interactions in analysis of variance
    • Interactions in analysis of covariance
    • Interactions in multiple linear regression
    • The general linear model
    • To be determined

Review oneway analysis of variance

  • \(H_0:\ \mu_1=\mu_2=...=\mu_k\)
  • \(H_1:\ \mu_i \ne \mu_j\) for some i, j
    • Reject \(H_0\) if F-ratio is large
  • Note: when k=2, use analysis of variance or t-test

Full moon data

  • Admission rates to mental health clinic before, during, and after full moon.
  • One year of data

Boxplot of full moon data

Descriptive statistics

Analysis of variance table

Tukey post hoc

Creating indicator variables

Running general linear model with all indicator variables

Analysis of variance with first and second indicators

9

Parameter estimates, 1 of 3

  • 11.458 - 13.417 = -1.959
  • 10.917 - 13.417 = -2.5

Parameter estimates, 2 of 3

  • 11.458 - 10.917 = 0.541
  • 13.417 - 10.917 = 2.5

  • 10.917 - 11.458 = -0.541
  • 13.417 - 11.458 = 1.959
  • \(\ \)
  • Reference category, the category associated with the indicator variable left out of the model.

Using moon as a fixed factor

Removing the unneeded rows

Parameter estimates using Moon as a fixed factor

Live demo, Multiple factor analysis of variance

Break #1

  • What you have learned
    • Indicator variables for three or more categories
  • What’s coming next
    • Multiple factor analysis of variance

Mathematical model

  • \(Y_{ijk} = \mu + \alpha_i + \beta_j +\epsilon_{ijk}\)
    • i=1,…,a levels of the first categorical variable
    • j=1,…,b levels of the second categorical variable
    • k=1,…,n replicates with first and second categories

\(\ \)

  • \(H_0:\ \alpha_i=0\) for all i

\(\ \)

  • \(H_0:\ \beta_j=0\) for all j

16

17

18

19

20

21

Live demo, Multiple factor analysis of variance

Break #2

  • What you have learned
    • Multiple factor analysis of variance
  • What’s coming next
    • Checking assumptions of analysis of variance

Assumptions

  • Normality
  • Equal variances
  • Independence

22

23

Live demo, Checking assumptions of analysis of variance

Break #3

  • What you have learned
    • Checking assumptions of analysis of variance
  • What’s coming next
    • Interactions in analysis of variance

1

2

3

4

Live demo, Interactions in analysis of variance

Break #4

  • What you have learned
    • Interactions in analysis of variance
  • What’s coming next
    • Interactions in analysis of covariance

5

6

7

8

Live demo, Interactions in analysis of covariance

Break #5

  • What you have learned
    • Interactions in analysis of covariance
  • What’s coming next
    • Interactions in multiple linear regression

9

10

Live demo, Interactions in multiple linear regression

Break #6

  • What you have learned
    • Interactions in multiple linear regression
  • What’s coming next
    • The general linear model

Slide 04-07

Live demo, The general linear model

Break #7

  • What you have learned
    • The general linear model
  • What’s coming next
    • To be determined

Slide 04-08

Live demo, To be determined

Summary

  • What you have learned
    • Indicator variables for three or more categories
    • Multiple factor analysis of variance
    • Checking assumptions of analysis of variance
    • Interactions in analysis of variance
    • Interactions in analysis of covariance
    • Interactions in multiple linear regression
    • The general linear model
    • To be determined

Additional topics??